<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Designing for resilience | ElasticSearch 7.7 权威指南中文版</title>
	<meta name="keywords" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <meta name="description" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
	<link rel="stylesheet" type="text/css" href="../static/styles.css" />
	<script>
	var _link = 'high-availability-cluster-design.html';
    </script>
</head>
<body>
<div class="main-container">
    <section id="content">
        <div class="content-wrapper">
            <section id="guide" lang="zh_cn">
                <div class="container">
                    <div class="row">
                        <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                            <div style="color:gray; word-break: break-all; font-size:12px;">原英文版地址: <a href="https://www.elastic.co/guide/en/elasticsearch/reference/7.7/high-availability-cluster-design.html" rel="nofollow" target="_blank">https://www.elastic.co/guide/en/elasticsearch/reference/7.7/high-availability-cluster-design.html</a>, 原文档版权归 www.elastic.co 所有<br/>本地英文版地址: <a href="../en/high-availability-cluster-design.html" rel="nofollow" target="_blank">../en/high-availability-cluster-design.html</a></div>
                        <!-- start body -->
                  <div class="page_header">
<strong>重要</strong>: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html" rel="nofollow">当前版本文档</a>。
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch Guide [7.7]</a></span>
»
<span class="breadcrumb-link"><a href="high-availability.html">Set up a cluster for high availability</a></span>
»
<span class="breadcrumb-node">Designing for resilience</span>
</div>
<div class="navheader">
<span class="prev">
<a href="high-availability.html">« Set up a cluster for high availability</a>
</span>
<span class="next">
<a href="high-availability-cluster-small-clusters.html">Resilience in small clusters »</a>
</span>
</div>
<div class="chapter">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="high-availability-cluster-design"></a>Designing for resilience<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/high-availability/cluster-design.asciidoc">edit</a>
</h2>
</div></div></div>
<p>Distributed systems like Elasticsearch are designed to keep working even if some of
their components have failed. As long as there are enough well-connected
nodes to take over their responsibilities, an Elasticsearch cluster can continue
operating normally if some of its nodes are unavailable or disconnected.</p>
<p>There is a limit to how small a resilient cluster can be. All Elasticsearch clusters
require:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
One <a class="xref" href="modules-discovery-quorums.html" title="Quorum-based decision making">elected master node</a> node
</li>
<li class="listitem">
At least one node for each <a class="xref" href="modules-node.html" title="Node">role</a>.
</li>
<li class="listitem">
At least one copy of every <a class="xref" href="scalability.html" title="可伸缩性和弹性：集群，节点和分片">shard</a>.
</li>
</ul>
</div>
<p>A resilient cluster requires redundancy for every required cluster component.
This means a resilient cluster must have:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
At least three master-eligible nodes
</li>
<li class="listitem">
At least two nodes of each role
</li>
<li class="listitem">
At least two copies of each shard (one primary and one or more replicas)
</li>
</ul>
</div>
<p>A resilient cluster needs three master-eligible nodes so that if one of
them fails then the remaining two still form a majority and can hold a
successful election.</p>
<p>Similarly, redundancy of nodes of each role means that if a node for a
particular role fails, another node can take on its responsibilities.</p>
<p>Finally, a resilient cluster should have at least two copies of each shard. If
one copy fails then there should be another good copy to take over. Elasticsearch
automatically rebuilds any failed shard copies on the remaining nodes in order
to restore the cluster to full health after a failure.</p>
<p>Failures temporarily reduce the total capacity of your cluster. In addition,
after a failure the cluster must perform additional background activities to
restore itself to health. You should make sure that your cluster has the
capacity to handle your workload even if some nodes fail.</p>
<p>Depending on your needs and budget, an Elasticsearch cluster can consist of a single
node, hundreds of nodes, or any number in between. When designing a smaller
cluster, you should typically focus on making it resilient to single-node
failures. Designers of larger clusters must also consider cases where multiple
nodes fail at the same time. The following pages give some recommendations for
building resilient clusters of various sizes:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<a class="xref" href="high-availability-cluster-small-clusters.html" title="Resilience in small clusters">Resilience in small clusters</a>
</li>
<li class="listitem">
<a class="xref" href="high-availability-cluster-design-large-clusters.html" title="Resilience in larger clusters">Resilience in larger clusters</a>
</li>
</ul>
</div>


</div>
<div class="navfooter">
<span class="prev">
<a href="high-availability.html">« Set up a cluster for high availability</a>
</span>
<span class="next">
<a href="high-availability-cluster-small-clusters.html">Resilience in small clusters »</a>
</span>
</div>
</div>

                  <!-- end body -->
                        </div>
                        <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                        
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </section>
</div>
<script src="../static/cn.js"></script>
</body>
</html>